<script>


    jxt.textdiv.ok = function (eleid) {
        var node = jxt.getnode(eleid);
        var str=$("textarea[data-jxt-data='"+eleid +"_value']").val();
        if(str){
        node.content = $.trim(str) ;
        jxt.msg.radio(eleid, "nodechange");
        }
        jxt.tag.ok(eleid);
    };




    jxt.textdiv.create = function (subscribe_id, eventkey, attrs, event_source_id) {
        var node = jxt.newJson(subscribe_id);
        if(attrs && attrs.tpname)
        {
            node.tpname=attrs.tpname;
        }
        jxt.msg.radio("textdiv", "addmainnode", {"newnodelist": node});
        jxt.route.exe('textdiv.editbegin',null,node.id)

    };
    jxt.msg.subscribe("textdiv", "createtextdiv", jxt.textdiv.create);
    jxt.msg.subscribe("self_evaluation", "createself_evaluation", 'self_evaluation.create');


</script>